﻿@model ContentResourceDto

<div class="divDetail">
    <div class="detailTitle">内容资源信息【@(Model.Type.Description())】</div>
    <div class="detailContent">
        <dl style="width: 100%">
            <dt>@Html.LabelFor(t => t.Title)</dt>
            <dd style="width: 80%">
                @Model.Title
            </dd>
        </dl>
        <dl style="width: 100%">
            <dt>@Html.LabelFor(t => t.Tags)</dt>
            <dd style="width: 80%">
                @Model.Tags
            </dd>
        </dl>
        <div class="line"></div>
        @switch (Model.BannerType)
    {
        case ContentResourceBannerType.Single:
            <dl style="width: 100%">
                <dt>@Html.LabelFor(t => t.SingleBanner)</dt>
                <dd style="width: 80%">
                    @Html.Ui().Attachment().SinglePreview(Model.SingleBanner)
                </dd>
            </dl>
        break;
    case ContentResourceBannerType.Three:
        <dl style="width: 100%">
            <dt>@Html.Label("三封面图")</dt>
            <dd style="width: 80%;">
                <div style="width: 50px;margin: auto;float: left">
                    @Html.Ui().Attachment().SinglePreview(Model.MultiBanners[0])
                </div>
                <div style="width: 50px;margin: auto;float: left">
                    @Html.Ui().Attachment().SinglePreview(Model.MultiBanners[1])
                </div>
                <div style="width: 50px;margin: auto;float: left">
                    @Html.Ui().Attachment().SinglePreview(Model.MultiBanners[2])
                </div>
            </dd>
        </dl>
    break;
}
        <div class="line"></div>
        <dl style="width: 100%">
            <dt>@Html.LabelFor(t => t.Video)</dt>
            <dd style="width: 80%">
                @Html.Ui().Attachment().SinglePreview(Model.Video)
            </dd>
        </dl>
        <div class="line"></div>
        <dl style="width: 100%">
            <dt>@Html.LabelFor(t => t.BriefIntroduction)</dt>
            <dd style="width: 80%">
                @Model.BriefIntroduction
            </dd>
        </dl>
        <div class="line"></div>
        <dl style="width: 100%">
            <dt>@Html.LabelFor(t => t.IsRegularPublication)</dt>
            <dd style="width: 80%">
                @Model.IsRegularPublication.Description()
            </dd>
        </dl>
        @if (Model.IsRegularPublication == true)
    {
        <dl>
            <dt>@Html.LabelFor(t => t.PublicationTime)</dt>
            <dd>
                @Model.PublicationTime.ToDateTimeString(true)
            </dd>
        </dl>
}
        <div class="line"></div>
        @if (!Model.CategoriyId.IsEmpty())
    {
        <dl>
            <dt>@Html.LabelFor(t => t.CategoriyName)</dt>
            <dd>
                @Model.CategoriyName
            </dd>
        </dl>
        <div class="line"></div>
}
        <dl>
            <dt>@Html.LabelFor(t => t.State)</dt>
            <dd>
                @Model.State.Description()
            </dd>
        </dl>
        <div class="line"></div>
        @if (Model.PublicationTime != null)
    {
        <dl>
            <dt>@Html.LabelFor(t => t.PublicationTime)</dt>
            <dd>
                @Model.PublicationTime.ToDateTimeString(true)
            </dd>
        </dl>
}
        <dl>
            <dt>@Html.LabelFor(t => t.CreationTime)</dt>
            <dd>
                @Model.CreationTime.ToDateTimeString(true)
            </dd>
        </dl>
    </div>
</div>